#!/bin/env python
#_*_ conding:utf-8 _*_
#_author_ = 'swht'

class SchoolMember(object):
    def __init__(self,name,age,sex):
        self.name = name
        self.age = age
        self.sex = sex
    def tell(self):
        print '''--info of %s---
                name:%s
                age :%s
                sex :%s
            '''%(self.name,self.name,self.age,self.sex)
class School(object):
    def __init__(self,name,addr,tel):
        self.school_name = name
        self.addr = addr
        self.tel = tel
        self.stu_list = []
        self.tech_list = []
class Student(SchoolMember):
    def __init__(self,name,age,sex,grade,school):
        SchoolMember.__init__(self,name,age,sex)
        self.school = school
        self.grade = grade
    def pay_money(self):
        print "----%s is paying the tuition fee---" % self.name
    def tell(self):
        SchoolMember.tell(self)
        print '''---from school name :%s
                        class : %s
                        addr:   %s''' % (self.school.school_name,self.grade,self.addr)
class Teacher(SchoolMember):
    def __init__(self,name,age,sex,course,salary,school):
        SchoolMember.__init__(self,name,age,sex )
        self.school = school
        self.course = course
        self.salary = salary
    def teaching(self):
        print "Teacher %s is teaching class of %s" %(self.name,self.course)

school = School("OldBoy","Shahe",5522)
school2 = School("ShangGuan","Changping",444522)

s =Student("WangSanjin",33,'M',"PY S10",school)
s2 =Student("LiSong",13,'F',"PY S10",school2)
s.tell()
print 'Student name:',s.name